package com.dingreading.cloud.ssxcx.dto;

import com.mybatisflex.annotation.RelationOneToOne;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 小程序学生答题记录表 实体类。
 *
 * @author EDY
 * @since 2025-08-15
 */
@Data
public class XcxStudentQuizAnswersDto implements Serializable {

    /**
     * 答题记录UID
     */
    private String uid;

    /**
     * 伙伴UID
     */
    private String agencyUid;

    /**
     * 门店UID
     */
    private String storeUid;

    /**
     * 关联的课节UID
     */
    private String subjectLessonUid;

    /**
     * 学生UID
     */
    private String studentUid;

    /**
     * 关联的问题UID (来自xcx_lesson_quiz_options表)
     */
    private String questionUid;

    /**
     * 学生选择的选项UID (来自xcx_lesson_quiz_options表)
     */
    private String studentOptionUid;

    /**
     * 是否正确: 1-正确, 0-错误
     */
    private Integer isCorrect;

    /**
     * 启用状态：1-属于当前有效作答, 0-属于历史作答记录
     */
    private Integer enabled;

    /**
     * 创建时间
     */
    private Date addTime;

    /**
     * 最后修改时间
     */
    private Date editTime;

    /**
     * 添加人用户ID
     */
    private String addStaffUid;

    /**
     * 添加人姓名
     */
    private String addStaffName;

    /**
     * 最后修改人用户ID
     */
    private String lastStaffUid;

    /**
     * 最后修改人姓名
     */
    private String lastStaffName;

    /**
     * 科目UID
     */
    private String projectUid;
    /**
     * 阶段UID
     */
    private String stageUid;

    /**
     * 学生姓名
     */
    private String studentName;

    /**
     * 学生手机号
     */
    private String phone;

    /**
     * 版本UID
     */
    private String versionUid;

    @RelationOneToOne(
            selfField = "questionUid",
            targetTable = "xcx_lesson_materials",
            targetField = "uid",
            valueField = "contentValue",
            extraCondition = ("enabled = 1")
    )
    private String questionContent;

    @RelationOneToOne(
            selfField = "studentOptionUid",
            targetTable = "xcx_lesson_quiz_options",
            targetField = "uid"
    )
    private XcxLearningOptionsDto xcxOptions;

    private List<String> questionImageUrls;

    private List<String> titles;

    private String lessonName;

}
